﻿using DNFImagePacks2Manager.NPK;
using System.Collections.Generic;

namespace DNFImagePacks2Manager.QuickTool.Models
{
    public class ReplaceImageIndex
    {
        private string _name = "";

        public string ImgName { get; set; } = "";
        public string Name
        {
            get
            {
                if (!string.IsNullOrEmpty(_name))
                {
                    return _name;
                }

                if (ImageList.Count > 0)
                {
                    return ImageList[0].Name;
                }

                return string.Empty;
            }
            set => _name = value;
        }
        public bool Enable { get; set; } = true;
        public bool ConvertV2 { get; set; } = false;
        public bool ReadOnly { get; set; } = false;
        public List<ReplaceImage> ImageList { get; set; } = [];
        public NPKIndex? ImageIndex { get; set; } = null;
    }
}
